<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php
	//ket noi server
	$db=mysql_connect("localhost","root","");
	if(!$db)
	{
		echo "Can not connect to server";
		exit;
	}
	mysql_select_db("ql_ban_sua");
	$result=mysql_query("select * from sua,hang_sua,loai_sua where sua.ma_hang_sua=hang_sua.ma_hang_sua and sua.ma_loai_sua=loai_sua.ma_loai_sua order by sua.ma_sua");
	if(mysql_num_rows($result)<>0)
	{
		echo "<table align='center' width=500 border='1'><caption style='color:#F30; font-weight:bold;'>THÔNG TIN CÁC SẢN PHẨM</caption>";
		while ($row=mysql_fetch_array($result))
		{
			$hinh=$row["Hinh"];
			$ten_sua=$row["Ten_sua"];
			$nsx=$row["Teng_hang_sua"];
			$trong_luong=$row['Trong_luong'];
			$don_gia=$row['Don_gia'];
			$loai_sua=$row["Ten_loai"];
			echo "<td>$hinh</td>";
			echo "<td><p><b>$ten_sua</b></p>";
			echo "Nhà sản xuất: $nsx<br />";
			echo "$loai_sua - $trong_luong gr - $don_gia VNĐ";
			echo "</td></tr>";
			
		}
		echo "</table>";
	}
?>

</body>
</html>